<#assign module="dispatch"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/form.css">
<link rel="stylesheet" href="${ctx}/assets/css/diaodu.css">
<link href="//api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css" rel="stylesheet" type="text/css" />


</@override>
<@override name="body">
			
			<div class="panel panel-default" id="realMap" style="position:relative;">
				<div class="panel-heading">
					<!--
					<div class="btn-group" style="margin-top:-5px;">
					  <button class="btn btn-default btn-sm" id="dropdown_status" type="button">
					    	选择状态 <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu" style="display:none;">
					    <li><a href="javascript:;"><input class="check_status check_status_kongxian" data-value="kongxian" type="checkbox" checked="checked"/>&nbsp;空闲</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_paidan" data-value="paidan" type="checkbox"/>&nbsp;已派单</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_manglu" data-value="manglu" type="checkbox"/>&nbsp;前往预约地</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_daokehu" data-value="daokehu" type="checkbox"/>&nbsp;等待客户</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_startdrive" data-value="startdrive" type="checkbox"/>&nbsp;前往目的地</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_dengdaijie" data-value="dengdaijie" type="checkbox"/>&nbsp;等待接</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_fancheng" data-value="fancheng" type="checkbox"/>&nbsp;返程</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_lixian" data-value="lixian" type="checkbox"/>&nbsp;未上线</a></li>
					    <li><a href="javascript:;"><input class="check_status check_status_workcar" data-value="workcar" type="checkbox"/>&nbsp;工作车</a></li>
					  </ul>
					</div>
					-->
					
					<span href="javascript:;" id="showall" class="driver-status-first allstatus">服务人员总数 <span id="allDrivers">0</span></span>|&nbsp;&nbsp;
					<a href="javascript:;" id="showkongxian" class="driver-status kongxian_active" data-value="kongxian"><span>空闲 <span id="kongxianDrivers">0</span></span></a>
					<a href="javascript:;" id="showpaidan" class="driver-status paidan" data-value="paidan"><span>已派单 <span id="paidanDrivers">0</span></span></a>
					<a href="javascript:;" id="showmanglu" class="driver-status manglu" data-value="manglu"><span>前往预约地 <span id="mangluDrivers">0</span></span></a>
					<a href="javascript:;" id="showdaokehu" class="driver-status daokehu" data-value="daokehu"><span>等待客户 <span id="daokehuDrivers">0</span></span></a>
					<a href="javascript:;" id="showstartdrive" class="driver-status startdrive" data-value="startdrive"><span>前往目的地 <span id="startdriveDrivers">0</span></span></a>
					<a href="javascript:;" id="showdengdaijie" class="driver-status dengdaijie" data-value="dengdaijie"><span>等待接 <span id="dengdaijieDrivers">0</span></span></a>
					<a href="javascript:;" id="showfancheng" class="driver-status fancheng" data-value="fancheng"><span>返程 <span id="fanchengDrivers">0</span></span></a>
					<a href="javascript:;" id="showlixian" class="driver-status lixian" data-value="lixian"><span>未上线 <span id="lixianDrivers">0</span></span></a>
					
					<a href="javascript:;" id="showworkcar" class="driver-status workcar" data-value="workcar"><span>工作车 <span id="workcarDrivers">0</span></span></a>
					<div style="float:right;">
					<a href="javascript:;" onclick="window.location.reload(true);">刷新</a>
					&nbsp;|&nbsp;
					<!--
					司机状态标识： 
					<small>
					<span class="driver-status kongxian">空闲</span>&nbsp;&nbsp;
					<span class="driver-status paidan">接单</span>&nbsp;&nbsp;
					<span class="driver-status manglu">忙碌</span>&nbsp;&nbsp;
					<span class="driver-status lixian">未上线</span>&nbsp;&nbsp;
					</small>
					-->
					
					<a href="javascript:;" id="fullscreen">全屏显示</a>
					&nbsp;
					<input id="request" type="button" class="btn btn-default" value="桌面推送" style="height:30px;padding:0px 12px;margin-top:-5px;">
					</div>
				</div>
				
			    <div id="allmap" style="z-index: 999; height:560px;">
        		</div>
				
				<div class="tuijiansiji-list-con" id="tuijiansijiDiv" style="position:absolute;z-index:99;bottom:0px;left:0px;top:auto;right:auto;">
			    </div>
				
				<div class="wr-list-con" id="newOrderDiv" style="position:absolute;z-index:99;bottom:0px;right:0px;top:auto;left:auto;">
			    	<#list newOrders as neworder>
				    	<div class="w-lc-nr newOrderDivChild" id="newOrder_${neworder.id}" data-value="${neworder.id}" data-name="${neworder.clientName?if_exists}" data-longitude="${neworder.clientLongitude?if_exists}" data-latitude="${neworder.clientLatitude?if_exists}" data-orderNum="${neworder.orderNumber?if_exists}">
	   						
	   						<li class="list-group-item newOrderLi border-red">
	   							${neworder.serverTime?string('HH:mm')} - ${neworder.fromPlace?if_exists}
	   							<@zhuan>
									<#if neworder.orderCarType=="daijia">
										-代
									<#elseif neworder.orderCarType=="zhuanche">
										-专
									</#if>
								</@zhuan>
								<#if neworder.memo?? && (neworder.memo?length>0)>
									</br>
									${neworder.memo}
								</#if>
	   						</li>
				        	<#--
				        	<div class="nr-bt"  <#if neworder.memo?? && (neworder.memo?length>0)>data-placement="left" data-original-title="备注：${neworder.memo}"</#if>>
				        		<div class="nr-bt-time">${neworder.serverTime?string('HH:mm')}</div>
				        		<div class="nr-bt-name">${neworder.fromPlace}</div>
				        		<div class="nr-bt-name1">
				        			<@zhuan>
										<#if neworder.orderCarType=="daijia">
											<span class="label label-danger" style="padding: 2px 4px;">
											代
											</span>
										<#elseif neworder.orderCarType=="zhuanche">
											<span class="label label-warning" style="padding: 2px 4px;">
											专
											</span>
										</#if>
									</@zhuan>
								</div>
				        	</div>
				        	-->
				        </div>
			        </#list>
			    </div>

			</div>
			
</@override>
<@override name="footer">
<script type="text/javascript">
	window.daijia = {
		ctx:'${ctx}',
		lng:'${longitude?if_exists}',
		lat:'${latitude?if_exists}',
		userId:'<@shiro.principal property='id'/>',
		zhuanche:false
	};
	<@zhuan>
		window.daijia.zhuanche=true;
	</@zhuan>
</script>
<script src="//api.map.baidu.com/api?v=2.0&ak=AuNk3YS21DSmHEEvIFDf9dbD" type="text/javascript"></script> 
<script type="text/javascript" src="//api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script>
<script src="${ctx}/assets/js/RichMarker_min.js" type="text/javascript"></script>
<script src="${ctx}/assets/js/jquery.zclip.min.js"></script>
<script src="${ctx}/assets/js/diaodu.js" type="text/javascript"></script> 
<script type="text/javascript">
	
	$(document).ready(function(){
		try { 
			$("#request").click(function(){
				if(window.webkitNotifications){
					if (window.webkitNotifications.checkPermission() === 0) {
						alert("已开启桌面推送通知！");
					}
					else if(window.webkitNotifications.checkPermission() === 2){
						alert("您已拒绝了桌面推送通知！");
					}
					else{
						window.webkitNotifications.requestPermission();
					}
				}
				else{
					alert("您的浏览器不支持桌面推送！");
				}
			});
		}catch(e){
			console.log(e);
		}
	});
 	
</script>
</@override>
<@extends name="../layout.ftl"/>